
#ifndef _244_FINAL_PROJECT_SONG_H_
#define _244_FINAL_PROJECT_SONG_H_

#include <string>
#include <sstream>
#include "Util.h"

using std::string;
using std::stringstream;


class Song;
class SongList;


class Song : public OrderedDataSet<Stanza*> {
private:
    typedef OrderedDataSet<Stanza*> Base;

    SQLHDBC hdbc;
    
    int id;
    string title;
    string comment;
    
public:
    Song(SQLHDBC hdbc_, int id_);
    ~Song();

    void load();
    void clear();

    //These will need to be overridden to support database queries
    void remove(int idx);
    void add(const T &addedData, int idx);
    void add(const T &addedData);
    void move(int from_idx, int to_idx);
    void swap(int idx1, int idx2);
};

class SongList : public DataSet<Song*> {
private:
    typedef DataSet<Song*> Base;

    SQLHDBC hdbc;
    
public:
    SongList(SQLHDBC hdbc_);
    ~SongList();
};

#endif // inclusion guard

